{extend name="iframe" /}
{block name="body"}
<form action="{:request()->url()}" class="layui-form mt30 mr50" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">选择章</label>
        <div class="layui-input-block">
            {if condition="$zhang"}
            <select name="chapterid" lay-verify="required">
            {else/}
            <select name="chapterid">
            {/if}
                <option value="">选择章</option>
                {foreach name="$zhang" item="v"}
                <option value="{$v.id}" {if condition="$data['chapterid'] eq $v.id" }selected="selected"{/if}>{$v.title}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">课时标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" value="{$data.title|default=''}" lay-verify="required" autocomplete="off" placeholder="请输入章名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否免费</label>
        <div class="layui-input-block">
            <input type="radio" name="isfree" {eq name="$data.isfree|default=1" value="1"}checked{/eq} title="是" value="1" checked />
            <input type="radio" name="isfree" {eq name="$data.isfree|default=0" value="0"}checked{/eq} title="否" value="0" />
        </div>
    </div>
    <div class="layui-form-item">
      	<label class="layui-form-label">开播时间</label>
      	<div class="layui-input-block">
          	<input type="text" class="layui-input" id="starttime" name="starttime" lay-verify="required" value="{$data.starttime|default=''}" placeholder="直播课程开课时间">
      	</div>
  	</div>
    <div class="layui-form-item">
        <label class="layui-form-label">直播时长</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="duration" lay-verify="required" value="{$data.duration|default=''}" autocomplete="off" placeholder="请填写直播时长，单位分钟" >
        </div>
    </div>
    <div class="layui-form-item">
    	<label class="layui-form-label">直播类型</label>
      	<div class="layui-input-block">
        	<select name="meetingtype" lay-verify="required">
          		<option value="">请选择直播类型</option>
          		<option value="2">大班课</option>
              	<option value="4">小班课</option>
                <option value="1">一对一</option>
        	</select>
      	</div>
      	<input type="hidden" name="csid" value="{$cid}"  class="layui-input">
        <input type="hidden" name="ischapter" value="0"  class="layui-input">
        <input type="hidden" name="status" value="1"  class="layui-input">
        <input type="hidden" name="sectype" value="1"  class="layui-input">
        <input type="hidden" name="coursetype" value="2"  class="layui-input">
        <input type="hidden" name="addtime" value="{$addtime}"  class="layui-input">
  	</div>
    <div class="layui-form-item mt30">
        <div class="layui-input-block">
            <button class="layui-btn" lay-filter="i" lay-submit="">保存</button>
            <button class="layui-btn layui-btn-primary" type="reset">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="js"}
<script>
 laydate.render({
    elem: '#starttime'
    ,type: 'datetime'
     ,trigger: 'click'
  });
</script>
{/block}
